
/*
'===============================================================================
'  Generated From - DAAB_DAL_NET2.vbgen
'  It is based on the DAAB from the November 2005 Enterprise Library
'  
'  This object is 'abstract' which means you need to inherit from it to be able
'  to instantiate it.  This is very easily done. You can override properties and
'  methods in your derived class, this allows you to regenerate this class at any
'  time and not worry about overwriting custom code. 
'
'  Custom DAL methods should be written into the inherited class.
' 
'  Version: 1.0
'  Date:	30/01/06
'  Summary: SelectOne, SelectAll, SelectAllWForeignKey, Insert, Update, Delete,
'  			DeleteAllWForeignKey.
'===============================================================================
*/
using System;
using System.Data;
using System.Data.Common;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;


namespace PlacementManager.DAL
{
    public abstract class _vwAllocatedVenues_DAL
    {
		#region Members
		protected int _VenuePlacementTypeId;
		protected int _VenueId;
		protected int _PlacementTypeId;
		protected bool _IsRestricted;
		protected int _MaxNumStudents;
		protected bool _IsActive;
		protected DateTime _DateCreated;
		protected string _CreatedBy;
		protected DateTime _DateUpdated;
		protected string _UpdatedBy;
		protected string _VenueName;
		protected bool _VenueSuppliedEducator;
		protected string _TelephoneNumber;
		protected string _Fax;
		protected string _GenericEmail;
		protected bool _VenueIsActive;
		protected string _Address1;
		protected string _Address2;
		protected string _City;
		protected string _PostCode;
		protected int _StateId;
		protected int _CountryId;
		protected bool _IsPostal;
		protected bool _AddressIsActive;
		protected bool _LinkVenueAddressIsActive;
		protected bool _IsPrimary;
		protected double _Latitude;
		protected double _Longitude;
		#endregion

		#region Properties
		
		public int VenuePlacementTypeId
		{
			get	{ return _VenuePlacementTypeId; }
			set	{ _VenuePlacementTypeId = value; }
		}
		
		public int VenueId
		{
			get	{ return _VenueId; }
			set	{ _VenueId = value; }
		}
		
		public int PlacementTypeId
		{
			get	{ return _PlacementTypeId; }
			set	{ _PlacementTypeId = value; }
		}
		
		public bool IsRestricted
		{
			get	{ return _IsRestricted; }
			set	{ _IsRestricted = value; }
		}
		
		public int MaxNumStudents
		{
			get	{ return _MaxNumStudents; }
			set	{ _MaxNumStudents = value; }
		}
		
		public bool IsActive
		{
			get	{ return _IsActive; }
			set	{ _IsActive = value; }
		}
		
		public DateTime DateCreated
		{
			get	{ return _DateCreated; }
			set	{ _DateCreated = value; }
		}
		
		public string CreatedBy
		{
			get	{ return _CreatedBy; }
			set	{ _CreatedBy = value; }
		}
		
		public DateTime DateUpdated
		{
			get	{ return _DateUpdated; }
			set	{ _DateUpdated = value; }
		}
		
		public string UpdatedBy
		{
			get	{ return _UpdatedBy; }
			set	{ _UpdatedBy = value; }
		}
		
		public string VenueName
		{
			get	{ return _VenueName; }
			set	{ _VenueName = value; }
		}
		
		public bool VenueSuppliedEducator
		{
			get	{ return _VenueSuppliedEducator; }
			set	{ _VenueSuppliedEducator = value; }
		}
		
		public string TelephoneNumber
		{
			get	{ return _TelephoneNumber; }
			set	{ _TelephoneNumber = value; }
		}
		
		public string Fax
		{
			get	{ return _Fax; }
			set	{ _Fax = value; }
		}
		
		public string GenericEmail
		{
			get	{ return _GenericEmail; }
			set	{ _GenericEmail = value; }
		}
		
		public bool VenueIsActive
		{
			get	{ return _VenueIsActive; }
			set	{ _VenueIsActive = value; }
		}
		
		public string Address1
		{
			get	{ return _Address1; }
			set	{ _Address1 = value; }
		}
		
		public string Address2
		{
			get	{ return _Address2; }
			set	{ _Address2 = value; }
		}
		
		public string City
		{
			get	{ return _City; }
			set	{ _City = value; }
		}
		
		public string PostCode
		{
			get	{ return _PostCode; }
			set	{ _PostCode = value; }
		}
		
		public int StateId
		{
			get	{ return _StateId; }
			set	{ _StateId = value; }
		}
		
		public int CountryId
		{
			get	{ return _CountryId; }
			set	{ _CountryId = value; }
		}
		
		public bool IsPostal
		{
			get	{ return _IsPostal; }
			set	{ _IsPostal = value; }
		}
		
		public bool AddressIsActive
		{
			get	{ return _AddressIsActive; }
			set	{ _AddressIsActive = value; }
		}
		
		public bool LinkVenueAddressIsActive
		{
			get	{ return _LinkVenueAddressIsActive; }
			set	{ _LinkVenueAddressIsActive = value; }
		}
		
		public bool IsPrimary
		{
			get	{ return _IsPrimary; }
			set	{ _IsPrimary = value; }
		}
		
		public double Latitude
		{
			get	{ return _Latitude; }
			set	{ _Latitude = value; }
		}
		
		public double Longitude
		{
			get	{ return _Longitude; }
			set	{ _Longitude = value; }
		}
		
		#endregion

        //Constructor
        public _vwAllocatedVenues_DAL()
        {

        }
		
		/// <summary>
		/// Purpose: SelectAll method. This method will Select all rows from the table.
		/// </summary>
		/// <returns></returns>
		public DataSet SelectAll()
        {
            // Create the Database object, using the default database service. The
            // default database service is determined through configuration.
            Database db = DatabaseFactory.CreateDatabase("PlacementManager");

            string sqlCommand = "pr_vwAllocatedVenues_DAL_SelectAll";
            DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);

            // Retrieve products from the specified category.
            db.AddInParameter(dbCommand, "ErrorCode", DbType.Int32, null);
		
            DataSet dsToReturn = null;
            dsToReturn = db.ExecuteDataSet(dbCommand);
            return dsToReturn;
        }
	}
}

